<%@ page contentType="text/html;charset=utf-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<link href="../style/2.css" rel="stylesheet"  type="text/css"/>
<%@ include file="admin_header.jsp"%>
<%@ include file="admin_container.jsp"%>
<img src="../images/admin/logo.jpg" />
<div id="content">
<%@ include file="admin_nav.jsp"%>
<div id="right">
<c:if test="${article == null}">
<h1 class="topmenu">添加新博客文章</h1>
<form action="<c:url value="/administrator/blog.htm?method=add"/>" method="post">
</c:if>
<c:if test="${article != null}">
<form action="<c:url value="/administrator/blog.htm?method=edit"/>" method="post">
<h1 class="topmenu">修改博客文章</h1>
<input name="articleID" type="hidden" value="${article.articleID }"/>
</c:if>

<dl>
	<dt><label for="title">标题:</label></dt>
	<dd><input type="text" name="title" value="${article.title}"/></dd>
	<dt><label for="author">作者:</label></dt>
	<dd><input type="text" name="author" value="${article.author}"/></dd>
	<dt><label for="keywords">关键字:</label></dt>
	<dd><input type="text" name="keywords" value="${article.keywords}"/></dd>
	<dt><label for="keywords">分类:</label></dt>
	<dd>
		<select name="category">
			<c:forEach var="category" items="${categoryList}">
				<option value="${category }" <c:if test="${article.category == category }"> <c:out value="selected"/></c:if> >${category }</option>
			</c:forEach>
		</select>
	</dd>
	<dt><label for="description">描述:</label></dt>
	<dd><textarea  cols="30" rows="5" name="description">${article.description}</textarea></dd>
	<dt><label for="imageName">图片名称:</label></dt>
	<dd><input type="text" name="imageName" value="${article.imageName}"/></dd>
<dt>
<div>
${fckEditor }
</div>
<input  id="button"  type="submit" value="保存文章信息"/>
</dt>
</dl>
</form>
</div>
</div>
<%@ include file="admin_footer.jsp"%>
